export default {
  getWho () {
    return window._xvueAxios({
      url: '/auth/who',
      method: 'get'
    })
  },
  getPublicUrl () {
    return window._xvueAxios({
      url: '/premise_iam/uc/v1/public_url',
      method: 'get'
    })
  },
  premise_auth_layOut () {
    return window._xvueAxios({
      url: '/premise_auth/logout',
      method: 'post',
      data: {}
    })
  },
  loginOut () {
    return window._xvueAxios({
      url: '/auth/logout',
      method: 'post',
      data: {}
    })
  },
  queryUserRoles (params) {
    return window._xvueAxios({
      method: 'get',
      url: '/iam/uc/v1/user/user_instance_roles',
      params: params
    })
  },
  getUserPermission (params) {
    return window._xvueAxios({
      method: 'get',
      url: `/auth/uc/permissions?uc_id=${params}`
    })
  },
  queryUserRolesCurLevel (params) {
    return window._xvueAxios({
      method: 'get',
      url: '/iam/uc/v1/user_instance_roles_current_level',
      params
    })
  }
}
